package com.nbsystem.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;


@Controller
@RequestMapping("exitSystem")
public class ExitController{
    @RequestMapping("exit")
    public String exit(HttpServletRequest req){
        HttpSession session = req.getSession();
        session.invalidate();
        return "redirect:/index";
    }
}
